import request from "@/utils/request";

export const articleChannelService = () => {
  return request.get("/my/cate/list");
};
export const addArticleChannelService = (data) => {
  return request.post("/my/cate/add", data);
};
export const updateArticleChannelService = (data) => {
  return request.put("/my/cate/info", data);
};
export const delArticleChannelService = (id) => {
  return request.delete("/my/cate/del", {
    params: {
      id,
    },
  });
};
export const getArticleListService = (params) => {
  return request.get("/my/article/list", {
    params,
  });
};
export const articlePublish = (obj) => {
  return request.post("/my/article/add", obj);
};
export const updateArticleService = (obj) => {
  return request.put("/my/article/info", obj);
};
export const getArticleDetailService = (id) => {
  return request.get("/my/article/info", {
    params: {
      id,
    },
  });
};
export const delArticleService = (id) => {
  request.delete("/my/article/info", {
    params: {
      id,
    },
  });
};
